<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        //prompt为输入框，用一个变量来接收存储
        var myName = prompt('请输入你的名字：');
        alert(myName);
    </script>

</head>

<body>

</body>

</html>